package control.module.po.authmanage;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;
import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 用户角色表
 * </p>
 *
 * @author cyj
 * @since 2020-10-21
 */
@TableName("t_user_role")
@Accessors(chain = true)
@Data
public class UserRole implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 用户id
     */
    @Length(max = 8, min = 1, message = "用户id，1-8位")
    private Integer userId;
    /**
     * 角色id
     */
    @Length(max = 8, min = 1, message = "角色id，1-8位")
    private Integer roleId;
    /**
     * 创建日期
     */
    @TableField(fill = FieldFill.INSERT)
    private Date createDate;
    /**
     * 创建人
     */
    @TableField(fill = FieldFill.INSERT)
    private String createBy;
}
